package net.oschina.arvin.admin.dao;

import net.oschina.arvin.admin.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * @author Arvin
 * @time 2017/11/22 22:21
 */
public interface UserDao extends JpaRepository<User, Long>, JpaSpecificationExecutor<User> {

    /**
     * 根据 uname 查询
     * <p>
     * 方法名称是有讲究的， findByxxx
     *
     * @param uname uname
     * @return
     */
    User findFirstByUname(String uname);
}
